Skip to content

Wait for getresultsasync to print the result before exiting - #818

Open
pcbeingused33 wants to merge 1 commit into
temporalio:mainfrom
pcbeingused33:fix/getresultsasync-await-result
Open

pcbeingused33 wants to merge 1 commit into
temporalio:mainfrom
pcbeingused33:fix/getresultsasync-await-result

Conversation

@pcbeingused33

Copy link
Copy Markdown

The async results sample discarded the stage that prints Result2 and exited after a fixed delay. A slow workflow could leave the result unprinted, and a failed workflow could still produce a successful exit.

Wait for the printing stage after the waiting message. This ensures the stage completes before the sample announces it is done and lets workflow failures propagate out of main.

The regression tests cover an exceptional result and a pending result that completes when the printing stage is joined.

AI assistance was used to prepare the change and tests.

@pcbeingused33
pcbeingused33 requested review from a team, antmendoza and tsurdilo as code owners December 4, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant